<?php

class Fencer_Form_Decorator_Radio extends Zend_Form_Decorator_Abstract
{
    protected $_diretorio = 'img/';

    public function render($content)
    {

        $element = $this->getElement();
        $view = $element->getView();

        $html = '<ul>';
        foreach($element->options as $value => $label){

            $radio = $view->formRadio('radio', null, array('class'=>"teste"), array($value=>$label));

            $html .= '<li>' . $radio . '<img src="' . $view->baseurl($this->_diretorio . $value) .'" /></li>';
        }
        $html .= '<ul>';

        return $html;
    }
}
